Object.defineProperty(exports, "__esModule", { value: !0 }),
  (exports.default = void 0);
var e = require("./wxENV");
var t = function () {
  var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
  return new Promise(function (r, a) {
    var n = t.headers || {};
    t.contentType && (n["content-type"] = t.contentType);
    var o = (0, e.getWxEnv)().request;
    t.useInner && (o = wx.request),
      o({
        url: t.url,
        method: t.method || "GET",
        data: t.data || {},
        dataType: t.dataType || "json",
        header: n,
        success: function (e) {
          var t = e.data;
          r(t);
        },
        fail: function (e) {
          a(e);
        },
      });
  });
};
exports.default = t;
